<template>
  <template v-for="(item,index) in dataList" :key="index">
    <VideoItem :data="item" :layoutType="1" :marginTop="20"></VideoItem>
  </template>
</template>
<script setup>
import {getCurrentInstance, inject, ref} from "vue";
import {useRoute, useRouter} from "vue-router";
import {ElMessage} from "element-plus";
import VideoItem from "@/components/VideoItem.vue";
import video_loadVideo from "@/data/video_loadVideo.json";

const {proxy} = getCurrentInstance();
const route = useRoute();
const router = useRouter();
const videoInfo = inject("videoInfo");
const dataList = ref([]);
const loadDataList = async () => {
  const data = {
    pageNo: 0,
    pCategoryId: 19,
    categoryId: 0
  }
  const res = video_loadVideo;
  if(res.code === 200) {
    dataList.value = res.data.list;
  }else{
    ElMessage.error(res.message);
  }
};
loadDataList();
</script>
<style lang="scss">
</style>